package com.ruoyi.zsyh.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.zsyh.mapper.ZsyhAgentMessageMapper;
import com.ruoyi.zsyh.domain.ZsyhAgentMessage;
import com.ruoyi.zsyh.service.IZsyhAgentMessageService;
import com.ruoyi.common.core.text.Convert;

/**
 * 大区会长消息提醒Service业务层处理
 * 
 * @author yuexl
 * @date 2022-01-20
 */
@Service
public class ZsyhAgentMessageServiceImpl implements IZsyhAgentMessageService 
{
    @Autowired
    private ZsyhAgentMessageMapper zsyhAgentMessageMapper;

    /**
     * 查询大区会长消息提醒
     * 
     * @param id 大区会长消息提醒ID
     * @return 大区会长消息提醒
     */
    @Override
    public ZsyhAgentMessage selectZsyhAgentMessageById(String id)
    {
        return zsyhAgentMessageMapper.selectZsyhAgentMessageById(id);
    }

    /**
     * 查询大区会长消息提醒列表
     * 
     * @param zsyhAgentMessage 大区会长消息提醒
     * @return 大区会长消息提醒
     */
    @Override
    public List<ZsyhAgentMessage> selectZsyhAgentMessageList(ZsyhAgentMessage zsyhAgentMessage)
    {
        return zsyhAgentMessageMapper.selectZsyhAgentMessageList(zsyhAgentMessage);
    }

    /**
     * 新增大区会长消息提醒
     * 
     * @param zsyhAgentMessage 大区会长消息提醒
     * @return 结果
     */
    @Override
    public int insertZsyhAgentMessage(ZsyhAgentMessage zsyhAgentMessage)
    {
        zsyhAgentMessage.setCreateTime(DateUtils.getNowDate());
        return zsyhAgentMessageMapper.insertZsyhAgentMessage(zsyhAgentMessage);
    }

    /**
     * 修改大区会长消息提醒
     * 
     * @param zsyhAgentMessage 大区会长消息提醒
     * @return 结果
     */
    @Override
    public int updateZsyhAgentMessage(ZsyhAgentMessage zsyhAgentMessage)
    {
        zsyhAgentMessage.setUpdateTime(DateUtils.getNowDate());
        return zsyhAgentMessageMapper.updateZsyhAgentMessage(zsyhAgentMessage);
    }

    /**
     * 删除大区会长消息提醒对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    @Override
    public int deleteZsyhAgentMessageByIds(String ids)
    {
        return zsyhAgentMessageMapper.deleteZsyhAgentMessageByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除大区会长消息提醒信息
     * 
     * @param id 大区会长消息提醒ID
     * @return 结果
     */
    @Override
    public int deleteZsyhAgentMessageById(String id)
    {
        return zsyhAgentMessageMapper.deleteZsyhAgentMessageById(id);
    }
}
